﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace mark
{
    public partial class SettingsForm : Form
    {
        

        int p1=1, p2=1;
        public SettingsForm()
        {
            InitializeComponent();
        }

        private void splitContainer1_Panel1_Paint(object sender, PaintEventArgs e)
        {

        }

        public void effect_show()
        {
            this.Show();
            int a = Height;
            for (int i = 1; i <= a; ++i)
            {
               // System.Threading.Thread.Sleep(1);
                Location = new Point(SystemInformation.PrimaryMonitorSize.Width - Width, SystemInformation.PrimaryMonitorSize.Height - i - 30 - 120);
            }

        }

        private void button1_Click(object sender, EventArgs e)
        {
            string[] table = new string[30];
            string[] table_title = new string[30];
            table[11] = "http://tutu.ru/rasp.php?st1=29404&st2=29204&date=today"; table_title[11] = "Долгопрудная - Марк";
            table[12] = "http://tutu.ru/rasp.php?st1=29404&st2=28804&date=today"; table_title[12] = "Долгопрудная - Окружная";
            table[13] = "http://tutu.ru/rasp.php?st1=29404&st2=28704&date=today"; table_title[13] = "Долгопрудная - Тимирязевская";
            table[14] = "http://tutu.ru/rasp.php?st1=29404&st2=28604&date=today"; table_title[14] = "Долгопрудная - Савеловская";
            table[21] = "http://tutu.ru/rasp.php?st1=29304&st2=29204&date=today"; table_title[21] = "Новодачная - Марк";
            table[22] = "http://tutu.ru/rasp.php?st1=29304&st2=28804&date=today"; table_title[22] = "Новодачная - Окружная";
            table[23] = "http://tutu.ru/rasp.php?st1=29304&st2=28704&date=today"; table_title[23] = "Новодачная - Тимирязевская";
            table[24] = "http://tutu.ru/rasp.php?st1=29304&st2=28604&date=today"; table_title[24] = "Новодачная - Савеловская";
            MainForm frm1 = (MainForm)this.Owner;
            frm1.label1.Text=table_title[10*p1+p2];
            frm1.linka=table[10*p1+p2];
            frm1.do_it();
            frm1.Refresh();
            this.Close();

        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            p1 = 2;
        }

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            p1 = 1;
        }

        private void radioButton3_CheckedChanged(object sender, EventArgs e)
        {
            p2 = 1;
        }

        private void radioButton4_CheckedChanged(object sender, EventArgs e)
        {
            p2 = 2;
        }

        private void radioButton5_CheckedChanged(object sender, EventArgs e)
        {
            p2 = 3;
        }

        private void radioButton6_CheckedChanged(object sender, EventArgs e)
        {
            p2 = 4;
        }
    }
}